from flask_restx import Resource

from app.common.libs import auth, permission_control


class AdminValidators(Resource):
    """
    admin身份校验器
    """

    decorators = [permission_control, auth.login_required]

    def __init__(self, api=None, *args, **kwargs):
        super().__init__(api=api, *args, **kwargs)
        self.user = auth.current_user()
